package com.exam.scjp5.objectives.section_1;

public class ExampleStaticVariable 
{
	public static void main(String args[])
	{
		StaticParent p = new StaticParent();
		StaticChild c = new StaticChild();
		
		System.out.println(StaticParent.A);
		System.out.println(StaticChild.A);
		
		System.out.println(p.A);
		System.out.println(c.A);
		
		p = c;
		System.out.println(p.A);
	}
}

class StaticParent
{
	public static final int A = 1;
}

class StaticChild extends StaticParent
{
	public static final int A = 2;
}